{layout name="layout/default" /}
<div class="panel panel-default panel-intro">
  <div class="panel-heading">
    <div class="panel-lead"><em>{$nav_title.title}</em>{$nav_title.remark}</div>
  </div>
  <div class="panel-body">
    <div id="myTabContent" class="tab-content">
      <div class="tab-pane fade active in">
        <div class="widget-body no-padding">
          <div class="bootstrap-table">
            <div class="fixed-table-toolbar">
              <div class="bs-bars pull-left">
                <div id="toolbar" class="toolbar"><a href="javascript:;" url="{:admin_url('admin/addon/index')}" class="btn btn-primary refurbish"><i class="fa fa-refresh"></i> </a> <button type="button" id="plupload-addon" class="btn btn-danger plupload" data-url="{:admin_url('admin/addon/local')}" data-mimetype="application/zip" data-multiple="false" initialized="true" style="position: relative; z-index: 1;"><i class="fa fa-upload"></i> 本地安装</button> <a href="javascript:;" class="btn btn-success btn-ajax" url="{:admin_url('admin/addon/refresh')}"><i class="fa fa-refresh"></i> 刷新插件缓存</a> <a class="btn btn-info downloaded" href="javascript:;" url="{:admin_url('admin/addon/index')}"><i class="fa fa-cloud"></i> 官方在线插件</a> <a class="btn btn-info downloaded" href="javascript:;" url="{:admin_url('admin/addon/downloaded')}"><i class="fa fa-laptop"></i> 本地安装插件</a></div>
              </div>
            </div>
          </div>
     <div class="fixed-table-container" style="padding-bottom: 0px;" id="contents">
    <div class="row row-flex" total="{$page['recordcount']}">
    {volist name="list" id="vo"}
    <div class="col-sm-4 col-md-3">
        <div class="thumbnail addon">
            <a href="{notempty name="vo['demourl']"}{$vo['demourl']}{else/}javascript:;{/notempty}" target="_blank"><img src="{notempty name="$vo['image']"}{$vo['image']}{else/}{$config.site.cdnurl}admin/zanpiancms/img/noaddon.gif{/notempty}" class="img-responsive" alt="{$vo['title']}" /></a>
            <div class="caption">
                <h4>{$vo['title']}  {notempty name="vo.flag"} {$flag[$vo['flag']]}{/notempty}</h4>
                <!--<p class="text-danger"><b>{$vo['title']}</b></p>-->
                <p class="text-muted">作者: {$vo['author']}</p>
                <p class="text-muted">描述: {$vo['intro']|msubstr=0,15}</p>
                <p class="text-muted">版本:{notempty name="addon[$vo['name']]"}{if condition="$vo['version'] neq $addon[$vo['name']]['version']"}
                 <span class="label label-danger">{$addon[$vo['name']]['version']}</span> -&gt; <span class="label label-success">{$vo['version']}</span>{else /}{$vo['version']}{/if}{else/}{$vo['version']}{/notempty}</p>
                {notempty name="vo['uptime']"}
                <p class="text-muted">更新时间: {$vo['uptime'|date='Y-m-d H:i:s',###]}</p>
                {/notempty}
                <p class="operate"  data-name="{$vo['name']}">
                {notempty name="addon[$vo['name']]"}
                {notempty name="addon[$vo['name']]['config']"}
                <a href="javascript:;" class="btn btn-primary btn-config"><i class="fa fa-pencil"></i> 配置</a>
                {/notempty}
                {eq name="addon[$vo['name']]['state']" value="1"}
                <a href="javascript:;" class="btn btn-warning btn-disable" data-action="disable"><i class="fa fa-times"></i> 点击禁用</a>
                {else/}
                <a href="javascript:;" class="btn btn-success btn-enable" data-action="enable"><i class="fa fa-check"></i> 点击启用</a>
                <a href="javascript:;" class="btn btn-danger btn-uninstall"><i class="fa fa-times"></i> 卸载</a>
                {/eq}
                {else/}
                <a href="javascript:;" class="btn btn-primary btn-success btn-install"><i class="fa fa-cloud-download"></i> 安装</a> 
                {/notempty}
                </p>
            </div>
        </div>
    </div>
   {/volist}
   </div>
             {gt name="page['pagecount']" value="1"}
            <div class="fixed-table-pagination" style="overflow:hidden">
              <div class="pull-left pagination-detail"><span class="pagination-info">共{$page['recordcount']}个插件 {$page['pageindex']}/{$page['pagecount']} </span><span class="page-list">每页显示 {$page['pagesize']} 条数据</span></div>
              <div class="pull-right pagination">
                <ul class="pagination">
                  {$page.pagelist}
                </ul>
              </div>
            </div>
            {/gt}     
          </div>       
        </div>
        <div class="clearfix"></div>
      </div>
    </div>
  </div>
</div>
</div>
<script id="conflicttpl" type="text/html">
    <div class="alert alert-dismissable alert-danger">
        <button type="button" class="close" data-dismiss="alert">×</button>
        <strong>警告!</strong> 此插件中发现和现有系统中部分文件发现冲突！以下文件将会被影响，请备份好相关文件后再继续操作
    </div>
    <table class="table table-striped">
        <thead>
            <tr>
                <th>#</th>
                <th>文件</th>
            </tr>
        </thead>
        <tbody>
            <%for(var i=0;i < conflictlist.length;i++){%>
            <tr>
                <th scope="row"><%=i+1%></th>
                <td><%=conflictlist[i]%></td>
            </tr>
            <%}%>
        </tbody>
    </table>
</script>
